
package cc.dd.marketing.api.constant;

import lombok.Getter;

/**
 * 功能
 *
 * @author dongsufeng
 * @date 2022/9/9 11:28 AM
 */
@Getter
public enum FunctionCodeEnum {
    /**
     * 参与
     */
    PARTICIPATE("participate"),
    //优惠券冻结
    FREEZE("freeze"),
    //解冻
    UNFREEZE("unfreeze"),
    USE("use");

    private String code;

    FunctionCodeEnum(String code) {
        this.code = code;
    }

    public static FunctionCodeEnum getByCode(String code){
        for (FunctionCodeEnum value : FunctionCodeEnum.values()) {
            if (value.getCode().equals(code)){
                return value;
            }
        }
        return null;
    }
}
